<template>
<div>
    <el-button @click="button" type="primary">只是一个测试</el-button>
    <el-button @click="button2" type="danger">去看一下京东组件</el-button>
</div>
</template>

<script>
export default {
    name:'RouterTest',
    methods:{
        button(){
            console.log('按了一下啊!');
            this.$message({
                message:'测试点了一下',
                type:'success'
            })
        },
        button2(){
            console.log('去了噢');
            this.$router.push({name:'JDTest',
                        params:{'upname':'是我好方'}})
        }
    },
}
</script>

<style scoped>

</style>